﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.Samples.ServiceHosting.StorageClient;

namespace WASM.WebSite.Logic
{
	public static class MessageExtention
	{
		public static string ShorterString(this Message message, int maxLength)
		{
			string content = message.ContentAsString();
			if (content.Length > maxLength)
				return content.Substring(0, maxLength - 3) + "...";
			else
				return content;
		}
	}
}
